package com.ruoyi.blsj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.blsj.mapper.BlsjHzxxMapper;
import com.ruoyi.blsj.domain.BlsjHzxx;
import com.ruoyi.blsj.service.IBlsjHzxxService;
import com.ruoyi.common.core.text.Convert;

/**
 * 患者信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-10
 */
@Service
public class BlsjHzxxServiceImpl implements IBlsjHzxxService 
{
    @Autowired
    private BlsjHzxxMapper blsjHzxxMapper;

    /**
     * 查询患者信息
     * 
     * @param id 患者信息主键
     * @return 患者信息
     */
    @Override
    public BlsjHzxx selectBlsjHzxxById(Long id)
    {
        return blsjHzxxMapper.selectBlsjHzxxById(id);
    }

    /**
     * 查询患者信息列表
     * 
     * @param blsjHzxx 患者信息
     * @return 患者信息
     */
    @Override
    public List<BlsjHzxx> selectBlsjHzxxList(BlsjHzxx blsjHzxx)
    {
        return blsjHzxxMapper.selectBlsjHzxxList(blsjHzxx);
    }

    /**
     * 新增患者信息
     * 
     * @param blsjHzxx 患者信息
     * @return 结果
     */
    @Override
    public int insertBlsjHzxx(BlsjHzxx blsjHzxx)
    {
        blsjHzxx.setCreateTime(DateUtils.getNowDate());
        return blsjHzxxMapper.insertBlsjHzxx(blsjHzxx);
    }

    /**
     * 修改患者信息
     * 
     * @param blsjHzxx 患者信息
     * @return 结果
     */
    @Override
    public int updateBlsjHzxx(BlsjHzxx blsjHzxx)
    {
        return blsjHzxxMapper.updateBlsjHzxx(blsjHzxx);
    }

    /**
     * 批量删除患者信息
     * 
     * @param ids 需要删除的患者信息主键
     * @return 结果
     */
    @Override
    public int deleteBlsjHzxxByIds(String ids)
    {
        return blsjHzxxMapper.deleteBlsjHzxxByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除患者信息信息
     * 
     * @param id 患者信息主键
     * @return 结果
     */
    @Override
    public int deleteBlsjHzxxById(Long id)
    {
        return blsjHzxxMapper.deleteBlsjHzxxById(id);
    }
}
